//=============================================================================
// TFBuildFailMsg.
//=============================================================================
class TFBuildFailMsg extends LocalMessage;

static function string GetString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1,
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
    if(switch==0) return "Not enough Energy";

    if(tfstation(optionalobject).myteam==0) return string(switch/48+1)$"m too near to red"@tfstation(optionalobject).Buildingname;
    return string(switch/48+1)$"m too near to blue"@tfstation(optionalobject).Buildingname;
}

defaultproperties
{
     bIsUnique=True
     bIsConsoleMessage=False
     bFadeMessage=True
     DrawColor=(B=0,G=0)
}
